#include <iostream>
#include <thread>

#include "StandardThread.h"
#include "RegisterTask.h"
#include "TaskPool.h"
#include "ThreadPool.h"

int main(int argc, char *argv[])
{
    std::cout << std::hex << std::endl;
    std::cout << "main: " << std::this_thread::get_id() << std::endl;

    std::shared_ptr<TaskPool> taskPool = std::make_shared<TaskPool>(1);
    std::shared_ptr<ThreadPool> threadPool = std::make_shared<ThreadPool>(taskPool);
    while (true)
    {
        std::string command;
        std::getline(std::cin, command);
        if ("quit" == command && taskPool->empty())
        {
           break; 
        }
        std::shared_ptr<RegisterTask> task = std::make_shared<RegisterTask>();
        taskPool->append(task);
    }

    return EXIT_SUCCESS;
}


